package com.example.qimo.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.qimo.dao.Menu;
import com.example.qimo.mapper.MenuMapper;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MenuService extends ServiceImpl<MenuMapper, Menu> implements IService<Menu> {
    public List<Menu> getMenu(String role){
        LambdaQueryWrapper<Menu> qr = new LambdaQueryWrapper<>();
        qr.like(Menu::getAuth,role);
        return list(qr);
    }
}
